//
//  CYGFoundCollectionCellView.m
//  CYGHuntForCity
//
//  Created by cygarm on 16/3/3.
//  Copyright © 2016年 cygarm. All rights reserved.
//

#import "CYGFoundCell.h"

@interface CYGFoundCell ()

@property (weak, nonatomic) IBOutlet UIImageView *iconImg;
@property (weak, nonatomic) IBOutlet UILabel *title;
@property (weak, nonatomic) IBOutlet UILabel *subTitle;

@end

@implementation CYGFoundCell

- (void)awakeFromNib {
    // Initialization code
}

+ (instancetype)cellWithCollectionView:(UICollectionView *)collectionView forIndexPath:(NSIndexPath *)indexPath ofModel:(CYGFoundCellModel *)model {
	static NSString *cellId = @"idFoundCell";
	
	CYGFoundCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:cellId forIndexPath:indexPath];
	if (cell == nil) {
		cell = [[[NSBundle mainBundle] loadNibNamed:NSStringFromClass([self class]) owner:nil options:nil] lastObject];
	}
	
	[cell.iconImg setImage:[UIImage imageNamed:model.icon]];
	cell.title.text = model.title;
	cell.subTitle.text = model.subTitle;
	
	return cell;
}

@end
